package modulo;

import java.util.Observable;
import java.util.Timer;
import java.util.TimerTask;

public class EnergiaTimer extends Observable{

	public EnergiaTimer(int tempo) {
		Timer t=new Timer();
		t.schedule(new EnergiaTimerTask(), 0,tempo);
	}
	
	private class EnergiaTimerTask extends TimerTask{

		@Override
		public void run() {
			setChanged();
			notifyObservers();
		}
		
	}
}
